package com.clsz.service.impl;

import com.clsz.annotation.RedisCache;
import com.clsz.bean.po.Category;
import com.clsz.mapper.FilmCategoryMapper;
import com.clsz.service.CategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {

    @Resource
    private FilmCategoryMapper filmCategoryMapper;

    @Override
    @RedisCache(duration = 60*60)
    public List<Category> getCategory() {
        return filmCategoryMapper.selectList(null);
    }
}
